3.12 \(\int \frac {\sin ^2(a+b \log (c x^n))}{x^3} \, dx\)

Optimal. Leaf size=98 \[ -\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b n \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b^2 n^2}{4 x^2 \left (b^2 n^2+1\right )} \]

[Out]

-1/4*b^2*n^2/(b^2*n^2+1)/x^2-1/2*b*n*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n))/(b^2*n^2+1)/x^2-1/2*sin(a+b*ln(c*x^
n))^2/(b^2*n^2+1)/x^2

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4487, 30} \[ -\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b n \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac {b^2 n^2}{4 x^2 \left (b^2 n^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*Log[c*x^n]]^2/x^3,x]

[Out]

-(b^2*n^2)/(4*(1 + b^2*n^2)*x^2) - (b*n*Cos[a + b*Log[c*x^n]]*Sin[a + b*Log[c*x^n]])/(2*(1 + b^2*n^2)*x^2) - S
in[a + b*Log[c*x^n]]^2/(2*(1 + b^2*n^2)*x^2)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 4487

Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_), x_Symbol] :> Simp[((m + 1)*(e*x)
^(m + 1)*Sin[d*(a + b*Log[c*x^n])]^p)/(b^2*d^2*e*n^2*p^2 + e*(m + 1)^2), x] + (Dist[(b^2*d^2*n^2*p*(p - 1))/(b
^2*d^2*n^2*p^2 + (m + 1)^2), Int[(e*x)^m*Sin[d*(a + b*Log[c*x^n])]^(p - 2), x], x] - Simp[(b*d*n*p*(e*x)^(m +
1)*Cos[d*(a + b*Log[c*x^n])]*Sin[d*(a + b*Log[c*x^n])]^(p - 1))/(b^2*d^2*e*n^2*p^2 + e*(m + 1)^2), x]) /; Free
Q[{a, b, c, d, e, m, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + (m + 1)^2, 0]

Rubi steps

\begin {align*} \int \frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx &=-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}-\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}+\frac {\left (b^2 n^2\right ) \int \frac {1}{x^3} \, dx}{2 \left (1+b^2 n^2\right )}\\ &=-\frac {b^2 n^2}{4 \left (1+b^2 n^2\right ) x^2}-\frac {b n \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}-\frac {\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 58, normalized size = 0.59 \[ -\frac {b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-\cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+b^2 n^2+1}{4 x^2 \left (b^2 n^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*Log[c*x^n]]^2/x^3,x]

[Out]

-1/4*(1 + b^2*n^2 - Cos[2*(a + b*Log[c*x^n])] + b*n*Sin[2*(a + b*Log[c*x^n])])/((1 + b^2*n^2)*x^2)

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 69, normalized size = 0.70 \[ -\frac {b^{2} n^{2} + 2 \, b n \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right ) \sin \left (b n \log \relax (x) + b \log \relax (c) + a\right ) - 2 \, \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{2} + 2}{4 \, {\left (b^{2} n^{2} + 1\right )} x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x^3,x, algorithm="fricas")

[Out]

-1/4*(b^2*n^2 + 2*b*n*cos(b*n*log(x) + b*log(c) + a)*sin(b*n*log(x) + b*log(c) + a) - 2*cos(b*n*log(x) + b*log
(c) + a)^2 + 2)/((b^2*n^2 + 1)*x^2)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sin \left (b \log \left (c x^{n}\right ) + a\right )^{2}}{x^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x^3,x, algorithm="giac")

[Out]

integrate(sin(b*log(c*x^n) + a)^2/x^3, x)

________________________________________________________________________________________

maple [F]  time = 0.06, size = 0, normalized size = 0.00 \[ \int \frac {\sin ^{2}\left (a +b \ln \left (c \,x^{n}\right )\right )}{x^{3}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*ln(c*x^n))^2/x^3,x)

[Out]

int(sin(a+b*ln(c*x^n))^2/x^3,x)

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 280, normalized size = 2.86 \[ -\frac {2 \, {\left (b^{2} \cos \left (2 \, b \log \relax (c)\right )^{2} + b^{2} \sin \left (2 \, b \log \relax (c)\right )^{2}\right )} n^{2} + 2 \, \cos \left (2 \, b \log \relax (c)\right )^{2} + {\left ({\left (b \cos \left (2 \, b \log \relax (c)\right ) \sin \left (4 \, b \log \relax (c)\right ) - b \cos \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) + b \sin \left (2 \, b \log \relax (c)\right )\right )} n - \cos \left (4 \, b \log \relax (c)\right ) \cos \left (2 \, b \log \relax (c)\right ) - \sin \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) - \cos \left (2 \, b \log \relax (c)\right )\right )} \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 2 \, \sin \left (2 \, b \log \relax (c)\right )^{2} + {\left ({\left (b \cos \left (4 \, b \log \relax (c)\right ) \cos \left (2 \, b \log \relax (c)\right ) + b \sin \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) + b \cos \left (2 \, b \log \relax (c)\right )\right )} n + \cos \left (2 \, b \log \relax (c)\right ) \sin \left (4 \, b \log \relax (c)\right ) - \cos \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) + \sin \left (2 \, b \log \relax (c)\right )\right )} \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}{8 \, {\left ({\left (b^{2} \cos \left (2 \, b \log \relax (c)\right )^{2} + b^{2} \sin \left (2 \, b \log \relax (c)\right )^{2}\right )} n^{2} + \cos \left (2 \, b \log \relax (c)\right )^{2} + \sin \left (2 \, b \log \relax (c)\right )^{2}\right )} x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x^3,x, algorithm="maxima")

[Out]

-1/8*(2*(b^2*cos(2*b*log(c))^2 + b^2*sin(2*b*log(c))^2)*n^2 + 2*cos(2*b*log(c))^2 + ((b*cos(2*b*log(c))*sin(4*
b*log(c)) - b*cos(4*b*log(c))*sin(2*b*log(c)) + b*sin(2*b*log(c)))*n - cos(4*b*log(c))*cos(2*b*log(c)) - sin(4
*b*log(c))*sin(2*b*log(c)) - cos(2*b*log(c)))*cos(2*b*log(x^n) + 2*a) + 2*sin(2*b*log(c))^2 + ((b*cos(4*b*log(
c))*cos(2*b*log(c)) + b*sin(4*b*log(c))*sin(2*b*log(c)) + b*cos(2*b*log(c)))*n + cos(2*b*log(c))*sin(4*b*log(c
)) - cos(4*b*log(c))*sin(2*b*log(c)) + sin(2*b*log(c)))*sin(2*b*log(x^n) + 2*a))/(((b^2*cos(2*b*log(c))^2 + b^
2*sin(2*b*log(c))^2)*n^2 + cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*x^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\sin \left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^3} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*log(c*x^n))^2/x^3,x)

[Out]

int(sin(a + b*log(c*x^n))^2/x^3, x)

________________________________________________________________________________________

sympy [A]  time = 25.80, size = 672, normalized size = 6.86 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*ln(c*x**n))**2/x**3,x)

[Out]

Piecewise((log(x)*sin(-a + I*log(x) + I*log(c)/n)**2/(4*x**2) + I*log(x)*sin(-a + I*log(x) + I*log(c)/n)*cos(-
a + I*log(x) + I*log(c)/n)/(2*x**2) - log(x)*cos(-a + I*log(x) + I*log(c)/n)**2/(4*x**2) - sin(-a + I*log(x) +
 I*log(c)/n)**2/(2*x**2) - I*sin(-a + I*log(x) + I*log(c)/n)*cos(-a + I*log(x) + I*log(c)/n)/(4*x**2) + log(c)
*sin(-a + I*log(x) + I*log(c)/n)**2/(4*n*x**2) + I*log(c)*sin(-a + I*log(x) + I*log(c)/n)*cos(-a + I*log(x) +
I*log(c)/n)/(2*n*x**2) - log(c)*cos(-a + I*log(x) + I*log(c)/n)**2/(4*n*x**2), Eq(b, -I/n)), (log(x)*sin(a + I
*log(x) + I*log(c)/n)**2/(4*x**2) + I*log(x)*sin(a + I*log(x) + I*log(c)/n)*cos(a + I*log(x) + I*log(c)/n)/(2*
x**2) - log(x)*cos(a + I*log(x) + I*log(c)/n)**2/(4*x**2) + 3*I*sin(a + I*log(x) + I*log(c)/n)*cos(a + I*log(x
) + I*log(c)/n)/(4*x**2) - cos(a + I*log(x) + I*log(c)/n)**2/(2*x**2) + log(c)*sin(a + I*log(x) + I*log(c)/n)*
*2/(4*n*x**2) + I*log(c)*sin(a + I*log(x) + I*log(c)/n)*cos(a + I*log(x) + I*log(c)/n)/(2*n*x**2) - log(c)*cos
(a + I*log(x) + I*log(c)/n)**2/(4*n*x**2), Eq(b, I/n)), (-b**2*n**2*sin(a + b*n*log(x) + b*log(c))**2/(4*b**2*
n**2*x**2 + 4*x**2) - b**2*n**2*cos(a + b*n*log(x) + b*log(c))**2/(4*b**2*n**2*x**2 + 4*x**2) - 2*b*n*sin(a +
b*n*log(x) + b*log(c))*cos(a + b*n*log(x) + b*log(c))/(4*b**2*n**2*x**2 + 4*x**2) - 2*sin(a + b*n*log(x) + b*l
og(c))**2/(4*b**2*n**2*x**2 + 4*x**2), True))

________________________________________________________________________________________